{
 "cells": [
  {
   "cell_type": "code",
   "outputs": [],
   "source": [
    "import math\n",
    "import numpy as np\n",
    "import torch\n",
    "from torch import nn\n",
    "from d2l import torch as d2l"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-03-29T03:33:39.215300Z",
     "start_time": "2024-03-29T03:33:34.924468Z"
    }
   },
   "id": "fab1bc6c7663236d",
   "execution_count": 1
  },
  {
   "cell_type": "code",
   "outputs": [],
   "source": [
    "max_degree = 20  # 多项式的最大阶数\n",
    "n_train, n_test = 100, 100  # 训练和测试数据集大小\n",
    "true_w = np.zeros(max_degree)  # 分配大量的空间\n",
    "true_w[0:4] = np.array([5, 1.2, -3.4, 5.6])\n",
    "\n",
    "features = np.random.normal(size=(n_train + n_test, 1))\n",
    "np.random.shuffle(features)\n",
    "poly_features = np.power(features, np.arange(max_degree).reshape(1, -1))\n",
    "for i in range(max_degree):\n",
    "    poly_features[:, i] /= math.gamma(i + 1)  # gamma(n)=(n-1)!\n",
    "# labels的维度:(n_train+n_test,)\n",
    "labels = np.dot(poly_features, true_w)\n",
    "labels += np.random.normal(scale=0.1, size=labels.shape)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-03-29T03:35:56.564792Z",
     "start_time": "2024-03-29T03:35:56.539143Z"
    }
   },
   "id": "a90f30a5e69821d",
   "execution_count": 2
  },
  {
   "cell_type": "code",
   "outputs": [
    {
     "data": {
      "text/plain": "(tensor([[ 0.5382],\n         [-0.4276]]),\n tensor([[ 1.0000e+00,  5.3817e-01,  1.4482e-01,  2.5979e-02,  3.4952e-03,\n           3.7621e-04,  3.3744e-05,  2.5943e-06,  1.7452e-07,  1.0436e-08,\n           5.6164e-10,  2.7478e-11,  1.2323e-12,  5.1016e-14,  1.9611e-15,\n           7.0361e-17,  2.3666e-18,  7.4921e-20,  2.2400e-21,  6.3449e-23],\n         [ 1.0000e+00, -4.2762e-01,  9.1428e-02, -1.3032e-02,  1.3932e-03,\n          -1.1915e-04,  8.4917e-06, -5.1874e-07,  2.7728e-08, -1.3174e-09,\n           5.6336e-11, -2.1900e-12,  7.8041e-14, -2.5670e-15,  7.8408e-17,\n          -2.2352e-18,  5.9739e-20, -1.5027e-21,  3.5698e-23, -8.0343e-25]]),\n tensor([5.4978, 4.0616]))"
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# NumPy ndarray转换为tensor\n",
    "true_w, features, poly_features, labels = [torch.tensor(x, dtype=\n",
    "    torch.float32) for x in [true_w, features, poly_features, labels]]\n",
    "\n",
    "features[:2], poly_features[:2, :], labels[:2]"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-03-29T03:35:58.256839Z",
     "start_time": "2024-03-29T03:35:58.232276Z"
    }
   },
   "id": "2b3adb0bdacb0b04",
   "execution_count": 3
  },
  {
   "cell_type": "code",
   "outputs": [],
   "source": [
    "def evaluate_loss(net, data_iter, loss):  #@save\n",
    "    \"\"\"评估给定数据集上模型的损失\"\"\"\n",
    "    metric = d2l.Accumulator(2)  # 损失的总和,样本数量\n",
    "    for X, y in data_iter:\n",
    "        out = net(X)\n",
    "        y = y.reshape(out.shape)\n",
    "        l = loss(out, y)\n",
    "        metric.add(l.sum(), l.numel())\n",
    "    return metric[0] / metric[1]"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-03-29T03:36:56.629457Z",
     "start_time": "2024-03-29T03:36:56.622932Z"
    }
   },
   "id": "2b11f72465250c51",
   "execution_count": 4
  },
  {
   "cell_type": "code",
   "outputs": [],
   "source": [
    "def accuracy(y_hat, y):  #@save\n",
    "    \"\"\"计算预测正确的数量\"\"\"\n",
    "    if len(y_hat.shape) > 1 and y_hat.shape[1] > 1:\n",
    "        y_hat = y_hat.argmax(axis=1)\n",
    "    cmp = y_hat.type(y.dtype) == y\n",
    "    return float(cmp.type(y.dtype).sum())\n",
    "\n",
    "\n",
    "def train_epoch_ch3(net, train_iter, loss, updater):\n",
    "    if isinstance(net, torch.nn.Module):\n",
    "        net.train()\n",
    "    metric = d2l.Accumulator(3)\n",
    "    for X, y in train_iter:\n",
    "        y_hat = net(X)\n",
    "        l = loss(y_hat, y)\n",
    "        if isinstance(updater, torch.optim.Optimizer):\n",
    "            updater.zero_grad()\n",
    "            l.mean().backward()\n",
    "            updater.step()\n",
    "        else:\n",
    "            l.sum().backward()\n",
    "            updater(X.shape[0])\n",
    "        metric.add(float(l.sum()), accuracy(y_hat, y), y.numel())\n",
    "    return metric[0] / metric[2], metric[1] / metric[2]\n",
    "\n",
    "\n",
    "def evaluate_accuracy(net, data_iter):  #@save\n",
    "    \"\"\"计算在指定数据集上模型的精度\"\"\"\n",
    "    if isinstance(net, torch.nn.Module):\n",
    "        net.eval()  # 将模型设置为评估模式\n",
    "    metric = d2l.Accumulator(2)  # 正确预测数、预测总数\n",
    "    with torch.no_grad():\n",
    "        for X, y in data_iter:\n",
    "            metric.add(accuracy(net(X), y), y.numel())\n",
    "    return metric[0] / metric[1]\n",
    "\n",
    "\n",
    "def train_ch3(net, train_iter, test_iter, loss, num_epochs, updater):\n",
    "    animator = d2l.Animator(xlabel='epoch', xlim=[1, num_epochs], ylim=[0.3, 0.9],\n",
    "                        legend=['train loss', 'train acc', 'test acc'])\n",
    "    for epoch in range(num_epochs):\n",
    "        train_metrics = train_epoch_ch3(net, train_iter, loss, updater)\n",
    "        test_acc = evaluate_accuracy(net, test_iter)\n",
    "        animator.add(epoch + 1, train_metrics + (test_acc,))\n",
    "    train_loss, train_acc = train_metrics\n",
    "    assert train_loss < 0.5, train_loss\n",
    "    assert 1 >= train_acc > 0.7, train_acc\n",
    "    assert 1 >= test_acc > 0.7, test_acc"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-03-29T03:37:48.134588Z",
     "start_time": "2024-03-29T03:37:47.981419Z"
    }
   },
   "id": "e3a61fc7984a0748",
   "execution_count": 5
  },
  {
   "cell_type": "code",
   "outputs": [],
   "source": [
    "def train(train_features, test_features, train_labels, test_labels,\n",
    "          num_epochs=400):\n",
    "    loss = nn.MSELoss(reduction='none')\n",
    "    input_shape = train_features.shape[-1]\n",
    "    # 不设置偏置，因为我们已经在多项式中实现了它\n",
    "    net = nn.Sequential(nn.Linear(input_shape, 1, bias=False))\n",
    "    batch_size = min(10, train_labels.shape[0])\n",
    "    train_iter = d2l.load_array((train_features, train_labels.reshape(-1,1)),\n",
    "                                batch_size)\n",
    "    test_iter = d2l.load_array((test_features, test_labels.reshape(-1,1)),\n",
    "                               batch_size, is_train=False)\n",
    "    trainer = torch.optim.SGD(net.parameters(), lr=0.01)\n",
    "    animator = d2l.Animator(xlabel='epoch', ylabel='loss', yscale='log',\n",
    "                            xlim=[1, num_epochs], ylim=[1e-3, 1e2],\n",
    "                            legend=['train', 'test'])\n",
    "    for epoch in range(num_epochs):\n",
    "        train_epoch_ch3(net, train_iter, loss, trainer)\n",
    "        if epoch == 0 or (epoch + 1) % 20 == 0:\n",
    "            animator.add(epoch + 1, (evaluate_loss(net, train_iter, loss),\n",
    "                                     evaluate_loss(net, test_iter, loss)))\n",
    "    print('weight:', net[0].weight.data.numpy())"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-03-29T03:38:07.801514Z",
     "start_time": "2024-03-29T03:38:07.776264Z"
    }
   },
   "id": "c1e72bb77f1f6958",
   "execution_count": 6
  },
  {
   "cell_type": "code",
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "weight: [[ 5.023222   1.2167312 -3.4045837  5.558864 ]]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 350x250 with 1 Axes>",
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"253.725pt\" height=\"183.775pt\" viewBox=\"0 0 253.725 183.775\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n <metadata>\n  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n   <cc:Work>\n    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n    <dc:date>2024-03-29T11:40:58.237074</dc:date>\n    <dc:format>image/svg+xml</dc:format>\n    <dc:creator>\n     <cc:Agent>\n      <dc:title>Matplotlib v3.7.2, https://matplotlib.org/</dc:title>\n     </cc:Agent>\n    </dc:creator>\n   </cc:Work>\n  </rdf:RDF>\n </metadata>\n <defs>\n  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M -0 183.775 \nL 253.725 183.775 \nL 253.725 0 \nL -0 0 \nz\n\" style=\"fill: #ffffff\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 43.725 149.325 \nL 239.025 149.325 \nL 239.025 10.725 \nL 43.725 10.725 \nz\n\" style=\"fill: #ffffff\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <path d=\"M 92.182895 149.325 \nL 92.182895 10.725 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_2\">\n      <defs>\n       <path id=\"m9cad5b3ac5\" d=\"M 0 0 \nL 0 3.5 \n\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#m9cad5b3ac5\" x=\"92.182895\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 100 -->\n      <g transform=\"translate(84.682895 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-31\" d=\"M 1400 3600 \nQ 1075 3275 575 2975 \nL 575 3450 \nQ 1200 3875 1600 4450 \nL 1900 4450 \nL 1900 150 \nL 1400 150 \nL 1400 3600 \nz\n\" transform=\"scale(0.015625)\"/>\n        <path id=\"SimHei-30\" d=\"M 225 2537 \nQ 250 3200 412 3587 \nQ 575 3975 875 4225 \nQ 1175 4475 1612 4475 \nQ 2050 4475 2375 4112 \nQ 2700 3750 2800 3200 \nQ 2900 2650 2862 1937 \nQ 2825 1225 2612 775 \nQ 2400 325 1975 150 \nQ 1550 -25 1125 187 \nQ 700 400 525 750 \nQ 350 1100 275 1487 \nQ 200 1875 225 2537 \nz\nM 750 2687 \nQ 675 2000 800 1462 \nQ 925 925 1212 700 \nQ 1500 475 1800 612 \nQ 2100 750 2237 1162 \nQ 2375 1575 2375 2062 \nQ 2375 2550 2337 2950 \nQ 2300 3350 2112 3675 \nQ 1925 4000 1612 4012 \nQ 1300 4025 1062 3700 \nQ 825 3375 750 2687 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-31\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_3\">\n      <path d=\"M 141.130263 149.325 \nL 141.130263 10.725 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_4\">\n      <g>\n       <use xlink:href=\"#m9cad5b3ac5\" x=\"141.130263\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 200 -->\n      <g transform=\"translate(133.630263 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-32\" d=\"M 300 250 \nQ 325 625 650 925 \nQ 975 1225 1475 1862 \nQ 1975 2500 2125 2850 \nQ 2275 3200 2237 3450 \nQ 2200 3700 2000 3862 \nQ 1800 4025 1537 4000 \nQ 1275 3975 1037 3800 \nQ 800 3625 675 3275 \nL 200 3350 \nQ 400 3925 712 4187 \nQ 1025 4450 1450 4475 \nQ 1700 4500 1900 4462 \nQ 2100 4425 2312 4287 \nQ 2525 4150 2662 3875 \nQ 2800 3600 2762 3212 \nQ 2725 2825 2375 2287 \nQ 2025 1750 1025 600 \nL 2825 600 \nL 2825 150 \nL 300 150 \nL 300 250 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-32\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_5\">\n      <path d=\"M 190.077632 149.325 \nL 190.077632 10.725 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_6\">\n      <g>\n       <use xlink:href=\"#m9cad5b3ac5\" x=\"190.077632\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 300 -->\n      <g transform=\"translate(182.577632 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-33\" d=\"M 250 1225 \nL 700 1300 \nQ 800 975 1025 762 \nQ 1250 550 1587 562 \nQ 1925 575 2125 837 \nQ 2325 1100 2300 1437 \nQ 2275 1775 2037 1962 \nQ 1800 2150 1275 2225 \nL 1275 2550 \nQ 1800 2600 2037 2825 \nQ 2275 3050 2250 3412 \nQ 2225 3775 1925 3937 \nQ 1625 4100 1287 3975 \nQ 950 3850 750 3275 \nL 300 3350 \nQ 450 3800 712 4100 \nQ 975 4400 1425 4450 \nQ 1875 4500 2212 4337 \nQ 2550 4175 2687 3837 \nQ 2825 3500 2725 3100 \nQ 2625 2700 2150 2400 \nQ 2500 2250 2687 1950 \nQ 2875 1650 2812 1162 \nQ 2750 675 2375 375 \nQ 2000 75 1525 87 \nQ 1050 100 700 387 \nQ 350 675 250 1225 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-33\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_7\">\n      <path d=\"M 239.025 149.325 \nL 239.025 10.725 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_8\">\n      <g>\n       <use xlink:href=\"#m9cad5b3ac5\" x=\"239.025\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 400 -->\n      <g transform=\"translate(231.525 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-34\" d=\"M 2000 1100 \nL 75 1100 \nL 75 1525 \nL 2100 4450 \nL 2475 4450 \nL 2475 1525 \nL 3075 1525 \nL 3075 1100 \nL 2475 1100 \nL 2475 150 \nL 2000 150 \nL 2000 1100 \nz\nM 2000 1525 \nL 2000 3500 \nL 600 1525 \nL 2000 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-34\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_5\">\n     <!-- epoch -->\n     <g transform=\"translate(128.875 175.325) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-65\" d=\"M 2850 1075 \nQ 2800 625 2450 350 \nQ 2100 75 1625 75 \nQ 1025 75 637 462 \nQ 250 850 250 1525 \nQ 250 2200 637 2587 \nQ 1025 2975 1625 2975 \nQ 2150 2975 2487 2637 \nQ 2825 2300 2825 1525 \nL 800 1525 \nQ 800 975 1037 750 \nQ 1275 525 1625 525 \nQ 1900 525 2075 662 \nQ 2250 800 2300 1075 \nL 2850 1075 \nz\nM 2250 1925 \nQ 2200 2275 2025 2412 \nQ 1850 2550 1575 2550 \nQ 1325 2550 1125 2412 \nQ 925 2275 825 1925 \nL 2250 1925 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-70\" d=\"M 2825 1525 \nQ 2825 800 2475 425 \nQ 2125 50 1625 50 \nQ 1350 50 1150 162 \nQ 950 275 800 500 \nL 800 -800 \nL 300 -800 \nL 300 2925 \nL 800 2925 \nL 800 2550 \nQ 950 2775 1150 2875 \nQ 1350 2975 1625 2975 \nQ 2125 2975 2475 2612 \nQ 2825 2250 2825 1525 \nz\nM 2275 1525 \nQ 2275 2000 2087 2262 \nQ 1900 2525 1525 2525 \nQ 1225 2525 1012 2262 \nQ 800 2000 800 1525 \nQ 800 1050 1012 775 \nQ 1225 500 1525 500 \nQ 1900 500 2087 775 \nQ 2275 1050 2275 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-6f\" d=\"M 2925 1525 \nQ 2925 875 2525 475 \nQ 2125 75 1575 75 \nQ 1025 75 625 475 \nQ 225 875 225 1525 \nQ 225 2175 625 2575 \nQ 1025 2975 1575 2975 \nQ 2125 2975 2525 2575 \nQ 2925 2175 2925 1525 \nz\nM 2375 1525 \nQ 2375 2025 2125 2275 \nQ 1875 2525 1575 2525 \nQ 1275 2525 1025 2275 \nQ 775 2025 775 1525 \nQ 775 1025 1025 775 \nQ 1275 525 1575 525 \nQ 1875 525 2125 775 \nQ 2375 1025 2375 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-63\" d=\"M 2850 1250 \nQ 2850 725 2487 400 \nQ 2125 75 1575 75 \nQ 1025 75 625 462 \nQ 225 850 225 1525 \nQ 225 2200 625 2587 \nQ 1025 2975 1575 2975 \nQ 2125 2975 2450 2687 \nQ 2775 2400 2775 2000 \nL 2225 2000 \nQ 2200 2300 2012 2412 \nQ 1825 2525 1575 2525 \nQ 1275 2525 1025 2287 \nQ 775 2050 775 1525 \nQ 775 1000 1025 762 \nQ 1275 525 1575 525 \nQ 1900 525 2100 700 \nQ 2300 875 2300 1250 \nL 2850 1250 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-68\" d=\"M 2800 125 \nL 2300 125 \nL 2300 1925 \nQ 2300 2225 2150 2400 \nQ 2000 2575 1750 2575 \nQ 1425 2575 1137 2237 \nQ 850 1900 850 1400 \nL 850 125 \nL 350 125 \nL 350 4400 \nL 850 4400 \nL 850 2400 \nQ 1050 2675 1287 2825 \nQ 1525 2975 1900 2975 \nQ 2350 2975 2575 2725 \nQ 2800 2475 2800 2100 \nL 2800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-65\"/>\n      <use xlink:href=\"#SimHei-70\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-6f\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-63\" x=\"150\"/>\n      <use xlink:href=\"#SimHei-68\" x=\"200\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_9\">\n      <path d=\"M 43.725 149.325 \nL 239.025 149.325 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_10\">\n      <defs>\n       <path id=\"ma1365d1f77\" d=\"M 0 0 \nL -3.5 0 \n\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#ma1365d1f77\" x=\"43.725\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- $\\mathdefault{10^{-3}}$ -->\n      <g transform=\"translate(19.325 152.85) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"STIXGeneral-Regular-a4\" d=\"M 3341 256 \nL 3034 -64 \nL 2406 563 \nQ 2029 301 1606 301 \nQ 1171 301 794 563 \nL 179 -64 \nL -141 256 \nL 486 870 \nQ 224 1248 224 1677 \nQ 224 2118 486 2483 \nL -141 3110 \nL 179 3418 \nL 794 2803 \nQ 1184 3053 1606 3053 \nQ 2048 3053 2406 2803 \nL 3034 3418 \nL 3341 3110 \nL 2726 2483 \nQ 2976 2112 2976 1683 \nQ 2976 1261 2726 870 \nL 3341 256 \nz\nM 2541 1690 \nQ 2541 2086 2265 2364 \nQ 1990 2643 1594 2643 \nQ 1210 2643 934 2361 \nQ 659 2080 659 1683 \nQ 659 1280 937 995 \nQ 1216 710 1606 710 \nQ 2003 710 2272 995 \nQ 2541 1280 2541 1690 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-33\" transform=\"translate(135.799794 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_11\">\n      <path d=\"M 43.725 121.605 \nL 239.025 121.605 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_12\">\n      <g>\n       <use xlink:href=\"#ma1365d1f77\" x=\"43.725\" y=\"121.605\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- $\\mathdefault{10^{-2}}$ -->\n      <g transform=\"translate(19.325 125.13) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-32\" transform=\"translate(135.799794 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_13\">\n      <path d=\"M 43.725 93.885 \nL 239.025 93.885 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_14\">\n      <g>\n       <use xlink:href=\"#ma1365d1f77\" x=\"43.725\" y=\"93.885\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- $\\mathdefault{10^{-1}}$ -->\n      <g transform=\"translate(19.325 97.36) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.335938)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.335938)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.328125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(135.799794 32.328125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_15\">\n      <path d=\"M 43.725 66.165 \nL 239.025 66.165 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_16\">\n      <g>\n       <use xlink:href=\"#ma1365d1f77\" x=\"43.725\" y=\"66.165\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- $\\mathdefault{10^{0}}$ -->\n      <g transform=\"translate(22.825 69.64) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.0625)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.0625)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(100.799805 32.054688) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_17\">\n      <path d=\"M 43.725 38.445 \nL 239.025 38.445 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_18\">\n      <g>\n       <use xlink:href=\"#ma1365d1f77\" x=\"43.725\" y=\"38.445\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- $\\mathdefault{10^{1}}$ -->\n      <g transform=\"translate(22.825 41.92) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.335938)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.335938)\"/>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(100.799805 32.328125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_19\">\n      <path d=\"M 43.725 10.725 \nL 239.025 10.725 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_20\">\n      <g>\n       <use xlink:href=\"#ma1365d1f77\" x=\"43.725\" y=\"10.725\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- $\\mathdefault{10^{2}}$ -->\n      <g transform=\"translate(22.825 14.25) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#SimHei-32\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_7\">\n     <g id=\"line2d_21\">\n      <defs>\n       <path id=\"mefe20bdadc\" d=\"M 0 0 \nL -2 0 \n\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"140.980449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_8\">\n     <g id=\"line2d_22\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"136.099199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_9\">\n     <g id=\"line2d_23\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"132.635897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_10\">\n     <g id=\"line2d_24\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"129.949551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_11\">\n     <g id=\"line2d_25\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"127.754647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_12\">\n     <g id=\"line2d_26\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"125.898882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_13\">\n     <g id=\"line2d_27\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"124.291346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_14\">\n     <g id=\"line2d_28\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"122.873398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_15\">\n     <g id=\"line2d_29\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"113.260449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_16\">\n     <g id=\"line2d_30\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"108.379199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_17\">\n     <g id=\"line2d_31\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"104.915897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_18\">\n     <g id=\"line2d_32\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"102.229551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_19\">\n     <g id=\"line2d_33\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"100.034647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_20\">\n     <g id=\"line2d_34\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"98.178882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_21\">\n     <g id=\"line2d_35\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"96.571346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_22\">\n     <g id=\"line2d_36\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"95.153398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_23\">\n     <g id=\"line2d_37\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"85.540449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_24\">\n     <g id=\"line2d_38\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"80.659199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_25\">\n     <g id=\"line2d_39\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"77.195897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_26\">\n     <g id=\"line2d_40\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"74.509551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_27\">\n     <g id=\"line2d_41\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"72.314647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_28\">\n     <g id=\"line2d_42\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"70.458882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_29\">\n     <g id=\"line2d_43\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"68.851346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_30\">\n     <g id=\"line2d_44\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"67.433398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_31\">\n     <g id=\"line2d_45\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"57.820449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_32\">\n     <g id=\"line2d_46\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"52.939199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_33\">\n     <g id=\"line2d_47\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"49.475897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_34\">\n     <g id=\"line2d_48\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"46.789551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_35\">\n     <g id=\"line2d_49\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"44.594647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_36\">\n     <g id=\"line2d_50\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"42.738882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_37\">\n     <g id=\"line2d_51\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"41.131346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_38\">\n     <g id=\"line2d_52\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"39.713398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_39\">\n     <g id=\"line2d_53\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"30.100449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_40\">\n     <g id=\"line2d_54\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"25.219199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_41\">\n     <g id=\"line2d_55\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"21.755897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_42\">\n     <g id=\"line2d_56\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"19.069551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_43\">\n     <g id=\"line2d_57\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"16.874647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_44\">\n     <g id=\"line2d_58\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"15.018882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_45\">\n     <g id=\"line2d_59\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"13.411346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_46\">\n     <g id=\"line2d_60\">\n      <g>\n       <use xlink:href=\"#mefe20bdadc\" x=\"43.725\" y=\"11.993398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- loss -->\n     <g transform=\"translate(14.075 90.025) rotate(-90) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-6c\" d=\"M 1825 125 \nL 1325 125 \nL 1325 4400 \nL 1825 4400 \nL 1825 125 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-73\" d=\"M 2750 900 \nQ 2750 500 2437 287 \nQ 2125 75 1650 75 \nQ 1050 75 725 312 \nQ 400 550 400 1000 \nL 900 1000 \nQ 900 700 1112 600 \nQ 1325 500 1625 500 \nQ 1925 500 2075 612 \nQ 2225 725 2225 900 \nQ 2225 1025 2100 1150 \nQ 1975 1275 1475 1350 \nQ 900 1425 687 1637 \nQ 475 1850 475 2200 \nQ 475 2500 762 2737 \nQ 1050 2975 1600 2975 \nQ 2100 2975 2387 2750 \nQ 2675 2525 2675 2150 \nL 2175 2150 \nQ 2175 2375 2012 2462 \nQ 1850 2550 1600 2550 \nQ 1275 2550 1137 2437 \nQ 1000 2325 1000 2175 \nQ 1000 2000 1125 1900 \nQ 1250 1800 1650 1750 \nQ 2300 1650 2525 1437 \nQ 2750 1225 2750 900 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-6c\"/>\n      <use xlink:href=\"#SimHei-6f\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"150\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_61\">\n    <path d=\"M 43.725 23.859641 \nL 53.025 64.990827 \nL 62.814474 83.335819 \nL 72.603947 92.670874 \nL 82.393421 99.861948 \nL 92.182895 106.221339 \nL 101.972368 111.610028 \nL 111.761842 115.806414 \nL 121.551316 118.75892 \nL 131.340789 120.642531 \nL 141.130263 121.758877 \nL 150.919737 122.383275 \nL 160.709211 122.722743 \nL 170.498684 122.903682 \nL 180.288158 122.99907 \nL 190.077632 123.049765 \nL 199.867105 123.076067 \nL 209.656579 123.088515 \nL 219.446053 123.097747 \nL 229.235526 123.101634 \nL 239.025 123.10322 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n   </g>\n   <g id=\"line2d_62\">\n    <path d=\"M 43.725 25.400856 \nL 53.025 60.194567 \nL 62.814474 65.07629 \nL 72.603947 70.540306 \nL 82.393421 77.145878 \nL 92.182895 83.96846 \nL 101.972368 90.576769 \nL 111.761842 96.686478 \nL 121.551316 102.053927 \nL 131.340789 106.601901 \nL 141.130263 110.14017 \nL 150.919737 112.794846 \nL 160.709211 114.624277 \nL 170.498684 115.94082 \nL 180.288158 116.78694 \nL 190.077632 117.392286 \nL 199.867105 117.773302 \nL 209.656579 118.017977 \nL 219.446053 118.262383 \nL 229.235526 118.385152 \nL 239.025 118.498756 \n\" clip-path=\"url(#pf6f2fc0e3a)\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 43.725 149.325 \nL 43.725 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 239.025 149.325 \nL 239.025 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 43.725 149.325 \nL 239.025 149.325 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 43.725 10.725 \nL 239.025 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"legend_1\">\n    <g id=\"patch_7\">\n     <path d=\"M 175.025 45.225 \nL 232.025 45.225 \nQ 234.025 45.225 234.025 43.225 \nL 234.025 17.725 \nQ 234.025 15.725 232.025 15.725 \nL 175.025 15.725 \nQ 173.025 15.725 173.025 17.725 \nL 173.025 43.225 \nQ 173.025 45.225 175.025 45.225 \nz\n\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n    </g>\n    <g id=\"line2d_63\">\n     <path d=\"M 177.025 23.225 \nL 187.025 23.225 \nL 197.025 23.225 \n\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n    </g>\n    <g id=\"text_13\">\n     <!-- train -->\n     <g transform=\"translate(205.025 26.725) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-74\" d=\"M 2750 200 \nQ 2625 150 2462 112 \nQ 2300 75 2025 75 \nQ 1575 75 1300 325 \nQ 1025 575 1025 1025 \nL 1025 2525 \nL 175 2525 \nL 175 2925 \nL 1025 2925 \nL 1025 3900 \nL 1525 3900 \nL 1525 2925 \nL 2550 2925 \nL 2550 2525 \nL 1525 2525 \nL 1525 1000 \nQ 1525 800 1625 662 \nQ 1725 525 2000 525 \nQ 2275 525 2450 575 \nQ 2625 625 2750 700 \nL 2750 200 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-72\" d=\"M 2500 2425 \nQ 2025 2500 1700 2287 \nQ 1375 2075 1150 1550 \nL 1150 125 \nL 650 125 \nL 650 2925 \nL 1150 2925 \nL 1150 2200 \nQ 1375 2600 1712 2787 \nQ 2050 2975 2500 2975 \nL 2500 2425 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-61\" d=\"M 2875 125 \nL 2275 125 \nQ 2225 175 2200 262 \nQ 2175 350 2175 475 \nQ 2000 275 1750 175 \nQ 1500 75 1225 75 \nQ 825 75 550 275 \nQ 275 475 275 850 \nQ 275 1225 525 1450 \nQ 775 1675 1300 1750 \nQ 1650 1800 1912 1875 \nQ 2175 1950 2175 2075 \nQ 2175 2225 2062 2375 \nQ 1950 2525 1575 2525 \nQ 1275 2525 1137 2412 \nQ 1000 2300 950 2100 \nL 400 2100 \nQ 450 2500 762 2737 \nQ 1075 2975 1575 2975 \nQ 2125 2975 2400 2725 \nQ 2675 2475 2675 2025 \nL 2675 650 \nQ 2675 500 2725 375 \nQ 2775 250 2875 125 \nz\nM 2175 1050 \nL 2175 1550 \nQ 2025 1500 1887 1462 \nQ 1750 1425 1425 1375 \nQ 1050 1325 937 1200 \nQ 825 1075 825 900 \nQ 825 750 937 637 \nQ 1050 525 1275 525 \nQ 1500 525 1762 650 \nQ 2025 775 2175 1050 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-69\" d=\"M 1800 3725 \nL 1300 3725 \nL 1300 4375 \nL 1800 4375 \nL 1800 3725 \nz\nM 1800 125 \nL 1300 125 \nL 1300 2925 \nL 1800 2925 \nL 1800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-6e\" d=\"M 2800 125 \nL 2300 125 \nL 2300 1925 \nQ 2300 2225 2150 2400 \nQ 2000 2575 1750 2575 \nQ 1425 2575 1137 2237 \nQ 850 1900 850 1400 \nL 850 125 \nL 350 125 \nL 350 2925 \nL 850 2925 \nL 850 2400 \nQ 1050 2675 1287 2825 \nQ 1525 2975 1900 2975 \nQ 2350 2975 2575 2725 \nQ 2800 2475 2800 2100 \nL 2800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-74\"/>\n      <use xlink:href=\"#SimHei-72\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-61\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-69\" x=\"150\"/>\n      <use xlink:href=\"#SimHei-6e\" x=\"200\"/>\n     </g>\n    </g>\n    <g id=\"line2d_64\">\n     <path d=\"M 177.025 36.475 \nL 187.025 36.475 \nL 197.025 36.475 \n\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n    </g>\n    <g id=\"text_14\">\n     <!-- test -->\n     <g transform=\"translate(205.025 39.975) scale(0.1 -0.1)\">\n      <use xlink:href=\"#SimHei-74\"/>\n      <use xlink:href=\"#SimHei-65\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-74\" x=\"150\"/>\n     </g>\n    </g>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pf6f2fc0e3a\">\n   <rect x=\"43.725\" y=\"10.725\" width=\"195.3\" height=\"138.6\"/>\n  </clipPath>\n </defs>\n</svg>\n"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 从多项式特征中选择前4个维度，即1,x,x^2/2!,x^3/3!\n",
    "train(poly_features[:n_train, :4], poly_features[n_train:, :4],\n",
    "      labels[:n_train], labels[n_train:])"
   ],
   "metadata": {
    "collapsed": false
   },
   "id": "2846d60ece5ce2ef",
   "execution_count": 9
  },
  {
   "cell_type": "markdown",
   "source": [],
   "metadata": {
    "collapsed": false
   },
   "id": "b6a0859c74899f6e"
  },
  {
   "cell_type": "code",
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "weight: [[3.1218734 5.0119343]]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 350x250 with 1 Axes>",
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"253.725pt\" height=\"183.775pt\" viewBox=\"0 0 253.725 183.775\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n <metadata>\n  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n   <cc:Work>\n    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n    <dc:date>2024-03-29T11:41:35.892241</dc:date>\n    <dc:format>image/svg+xml</dc:format>\n    <dc:creator>\n     <cc:Agent>\n      <dc:title>Matplotlib v3.7.2, https://matplotlib.org/</dc:title>\n     </cc:Agent>\n    </dc:creator>\n   </cc:Work>\n  </rdf:RDF>\n </metadata>\n <defs>\n  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M -0 183.775 \nL 253.725 183.775 \nL 253.725 0 \nL -0 0 \nz\n\" style=\"fill: #ffffff\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 43.725 149.325 \nL 239.025 149.325 \nL 239.025 10.725 \nL 43.725 10.725 \nz\n\" style=\"fill: #ffffff\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <path d=\"M 92.182895 149.325 \nL 92.182895 10.725 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_2\">\n      <defs>\n       <path id=\"m81b50a1537\" d=\"M 0 0 \nL 0 3.5 \n\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#m81b50a1537\" x=\"92.182895\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 100 -->\n      <g transform=\"translate(84.682895 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-31\" d=\"M 1400 3600 \nQ 1075 3275 575 2975 \nL 575 3450 \nQ 1200 3875 1600 4450 \nL 1900 4450 \nL 1900 150 \nL 1400 150 \nL 1400 3600 \nz\n\" transform=\"scale(0.015625)\"/>\n        <path id=\"SimHei-30\" d=\"M 225 2537 \nQ 250 3200 412 3587 \nQ 575 3975 875 4225 \nQ 1175 4475 1612 4475 \nQ 2050 4475 2375 4112 \nQ 2700 3750 2800 3200 \nQ 2900 2650 2862 1937 \nQ 2825 1225 2612 775 \nQ 2400 325 1975 150 \nQ 1550 -25 1125 187 \nQ 700 400 525 750 \nQ 350 1100 275 1487 \nQ 200 1875 225 2537 \nz\nM 750 2687 \nQ 675 2000 800 1462 \nQ 925 925 1212 700 \nQ 1500 475 1800 612 \nQ 2100 750 2237 1162 \nQ 2375 1575 2375 2062 \nQ 2375 2550 2337 2950 \nQ 2300 3350 2112 3675 \nQ 1925 4000 1612 4012 \nQ 1300 4025 1062 3700 \nQ 825 3375 750 2687 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-31\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_3\">\n      <path d=\"M 141.130263 149.325 \nL 141.130263 10.725 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_4\">\n      <g>\n       <use xlink:href=\"#m81b50a1537\" x=\"141.130263\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 200 -->\n      <g transform=\"translate(133.630263 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-32\" d=\"M 300 250 \nQ 325 625 650 925 \nQ 975 1225 1475 1862 \nQ 1975 2500 2125 2850 \nQ 2275 3200 2237 3450 \nQ 2200 3700 2000 3862 \nQ 1800 4025 1537 4000 \nQ 1275 3975 1037 3800 \nQ 800 3625 675 3275 \nL 200 3350 \nQ 400 3925 712 4187 \nQ 1025 4450 1450 4475 \nQ 1700 4500 1900 4462 \nQ 2100 4425 2312 4287 \nQ 2525 4150 2662 3875 \nQ 2800 3600 2762 3212 \nQ 2725 2825 2375 2287 \nQ 2025 1750 1025 600 \nL 2825 600 \nL 2825 150 \nL 300 150 \nL 300 250 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-32\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_5\">\n      <path d=\"M 190.077632 149.325 \nL 190.077632 10.725 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_6\">\n      <g>\n       <use xlink:href=\"#m81b50a1537\" x=\"190.077632\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 300 -->\n      <g transform=\"translate(182.577632 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-33\" d=\"M 250 1225 \nL 700 1300 \nQ 800 975 1025 762 \nQ 1250 550 1587 562 \nQ 1925 575 2125 837 \nQ 2325 1100 2300 1437 \nQ 2275 1775 2037 1962 \nQ 1800 2150 1275 2225 \nL 1275 2550 \nQ 1800 2600 2037 2825 \nQ 2275 3050 2250 3412 \nQ 2225 3775 1925 3937 \nQ 1625 4100 1287 3975 \nQ 950 3850 750 3275 \nL 300 3350 \nQ 450 3800 712 4100 \nQ 975 4400 1425 4450 \nQ 1875 4500 2212 4337 \nQ 2550 4175 2687 3837 \nQ 2825 3500 2725 3100 \nQ 2625 2700 2150 2400 \nQ 2500 2250 2687 1950 \nQ 2875 1650 2812 1162 \nQ 2750 675 2375 375 \nQ 2000 75 1525 87 \nQ 1050 100 700 387 \nQ 350 675 250 1225 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-33\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_7\">\n      <path d=\"M 239.025 149.325 \nL 239.025 10.725 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_8\">\n      <g>\n       <use xlink:href=\"#m81b50a1537\" x=\"239.025\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 400 -->\n      <g transform=\"translate(231.525 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-34\" d=\"M 2000 1100 \nL 75 1100 \nL 75 1525 \nL 2100 4450 \nL 2475 4450 \nL 2475 1525 \nL 3075 1525 \nL 3075 1100 \nL 2475 1100 \nL 2475 150 \nL 2000 150 \nL 2000 1100 \nz\nM 2000 1525 \nL 2000 3500 \nL 600 1525 \nL 2000 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-34\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_5\">\n     <!-- epoch -->\n     <g transform=\"translate(128.875 175.325) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-65\" d=\"M 2850 1075 \nQ 2800 625 2450 350 \nQ 2100 75 1625 75 \nQ 1025 75 637 462 \nQ 250 850 250 1525 \nQ 250 2200 637 2587 \nQ 1025 2975 1625 2975 \nQ 2150 2975 2487 2637 \nQ 2825 2300 2825 1525 \nL 800 1525 \nQ 800 975 1037 750 \nQ 1275 525 1625 525 \nQ 1900 525 2075 662 \nQ 2250 800 2300 1075 \nL 2850 1075 \nz\nM 2250 1925 \nQ 2200 2275 2025 2412 \nQ 1850 2550 1575 2550 \nQ 1325 2550 1125 2412 \nQ 925 2275 825 1925 \nL 2250 1925 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-70\" d=\"M 2825 1525 \nQ 2825 800 2475 425 \nQ 2125 50 1625 50 \nQ 1350 50 1150 162 \nQ 950 275 800 500 \nL 800 -800 \nL 300 -800 \nL 300 2925 \nL 800 2925 \nL 800 2550 \nQ 950 2775 1150 2875 \nQ 1350 2975 1625 2975 \nQ 2125 2975 2475 2612 \nQ 2825 2250 2825 1525 \nz\nM 2275 1525 \nQ 2275 2000 2087 2262 \nQ 1900 2525 1525 2525 \nQ 1225 2525 1012 2262 \nQ 800 2000 800 1525 \nQ 800 1050 1012 775 \nQ 1225 500 1525 500 \nQ 1900 500 2087 775 \nQ 2275 1050 2275 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-6f\" d=\"M 2925 1525 \nQ 2925 875 2525 475 \nQ 2125 75 1575 75 \nQ 1025 75 625 475 \nQ 225 875 225 1525 \nQ 225 2175 625 2575 \nQ 1025 2975 1575 2975 \nQ 2125 2975 2525 2575 \nQ 2925 2175 2925 1525 \nz\nM 2375 1525 \nQ 2375 2025 2125 2275 \nQ 1875 2525 1575 2525 \nQ 1275 2525 1025 2275 \nQ 775 2025 775 1525 \nQ 775 1025 1025 775 \nQ 1275 525 1575 525 \nQ 1875 525 2125 775 \nQ 2375 1025 2375 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-63\" d=\"M 2850 1250 \nQ 2850 725 2487 400 \nQ 2125 75 1575 75 \nQ 1025 75 625 462 \nQ 225 850 225 1525 \nQ 225 2200 625 2587 \nQ 1025 2975 1575 2975 \nQ 2125 2975 2450 2687 \nQ 2775 2400 2775 2000 \nL 2225 2000 \nQ 2200 2300 2012 2412 \nQ 1825 2525 1575 2525 \nQ 1275 2525 1025 2287 \nQ 775 2050 775 1525 \nQ 775 1000 1025 762 \nQ 1275 525 1575 525 \nQ 1900 525 2100 700 \nQ 2300 875 2300 1250 \nL 2850 1250 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-68\" d=\"M 2800 125 \nL 2300 125 \nL 2300 1925 \nQ 2300 2225 2150 2400 \nQ 2000 2575 1750 2575 \nQ 1425 2575 1137 2237 \nQ 850 1900 850 1400 \nL 850 125 \nL 350 125 \nL 350 4400 \nL 850 4400 \nL 850 2400 \nQ 1050 2675 1287 2825 \nQ 1525 2975 1900 2975 \nQ 2350 2975 2575 2725 \nQ 2800 2475 2800 2100 \nL 2800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-65\"/>\n      <use xlink:href=\"#SimHei-70\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-6f\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-63\" x=\"150\"/>\n      <use xlink:href=\"#SimHei-68\" x=\"200\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_9\">\n      <path d=\"M 43.725 149.325 \nL 239.025 149.325 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_10\">\n      <defs>\n       <path id=\"mf03715118e\" d=\"M 0 0 \nL -3.5 0 \n\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#mf03715118e\" x=\"43.725\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- $\\mathdefault{10^{-3}}$ -->\n      <g transform=\"translate(19.325 152.85) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"STIXGeneral-Regular-a4\" d=\"M 3341 256 \nL 3034 -64 \nL 2406 563 \nQ 2029 301 1606 301 \nQ 1171 301 794 563 \nL 179 -64 \nL -141 256 \nL 486 870 \nQ 224 1248 224 1677 \nQ 224 2118 486 2483 \nL -141 3110 \nL 179 3418 \nL 794 2803 \nQ 1184 3053 1606 3053 \nQ 2048 3053 2406 2803 \nL 3034 3418 \nL 3341 3110 \nL 2726 2483 \nQ 2976 2112 2976 1683 \nQ 2976 1261 2726 870 \nL 3341 256 \nz\nM 2541 1690 \nQ 2541 2086 2265 2364 \nQ 1990 2643 1594 2643 \nQ 1210 2643 934 2361 \nQ 659 2080 659 1683 \nQ 659 1280 937 995 \nQ 1216 710 1606 710 \nQ 2003 710 2272 995 \nQ 2541 1280 2541 1690 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-33\" transform=\"translate(135.799794 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_11\">\n      <path d=\"M 43.725 121.605 \nL 239.025 121.605 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_12\">\n      <g>\n       <use xlink:href=\"#mf03715118e\" x=\"43.725\" y=\"121.605\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- $\\mathdefault{10^{-2}}$ -->\n      <g transform=\"translate(19.325 125.13) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-32\" transform=\"translate(135.799794 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_13\">\n      <path d=\"M 43.725 93.885 \nL 239.025 93.885 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_14\">\n      <g>\n       <use xlink:href=\"#mf03715118e\" x=\"43.725\" y=\"93.885\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- $\\mathdefault{10^{-1}}$ -->\n      <g transform=\"translate(19.325 97.36) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.335938)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.335938)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.328125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(135.799794 32.328125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_15\">\n      <path d=\"M 43.725 66.165 \nL 239.025 66.165 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_16\">\n      <g>\n       <use xlink:href=\"#mf03715118e\" x=\"43.725\" y=\"66.165\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- $\\mathdefault{10^{0}}$ -->\n      <g transform=\"translate(22.825 69.64) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.0625)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.0625)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(100.799805 32.054688) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_17\">\n      <path d=\"M 43.725 38.445 \nL 239.025 38.445 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_18\">\n      <g>\n       <use xlink:href=\"#mf03715118e\" x=\"43.725\" y=\"38.445\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- $\\mathdefault{10^{1}}$ -->\n      <g transform=\"translate(22.825 41.92) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.335938)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.335938)\"/>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(100.799805 32.328125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_19\">\n      <path d=\"M 43.725 10.725 \nL 239.025 10.725 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_20\">\n      <g>\n       <use xlink:href=\"#mf03715118e\" x=\"43.725\" y=\"10.725\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- $\\mathdefault{10^{2}}$ -->\n      <g transform=\"translate(22.825 14.25) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#SimHei-32\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_7\">\n     <g id=\"line2d_21\">\n      <defs>\n       <path id=\"m28a5c42424\" d=\"M 0 0 \nL -2 0 \n\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"140.980449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_8\">\n     <g id=\"line2d_22\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"136.099199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_9\">\n     <g id=\"line2d_23\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"132.635897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_10\">\n     <g id=\"line2d_24\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"129.949551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_11\">\n     <g id=\"line2d_25\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"127.754647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_12\">\n     <g id=\"line2d_26\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"125.898882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_13\">\n     <g id=\"line2d_27\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"124.291346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_14\">\n     <g id=\"line2d_28\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"122.873398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_15\">\n     <g id=\"line2d_29\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"113.260449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_16\">\n     <g id=\"line2d_30\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"108.379199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_17\">\n     <g id=\"line2d_31\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"104.915897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_18\">\n     <g id=\"line2d_32\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"102.229551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_19\">\n     <g id=\"line2d_33\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"100.034647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_20\">\n     <g id=\"line2d_34\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"98.178882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_21\">\n     <g id=\"line2d_35\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"96.571346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_22\">\n     <g id=\"line2d_36\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"95.153398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_23\">\n     <g id=\"line2d_37\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"85.540449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_24\">\n     <g id=\"line2d_38\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"80.659199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_25\">\n     <g id=\"line2d_39\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"77.195897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_26\">\n     <g id=\"line2d_40\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"74.509551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_27\">\n     <g id=\"line2d_41\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"72.314647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_28\">\n     <g id=\"line2d_42\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"70.458882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_29\">\n     <g id=\"line2d_43\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"68.851346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_30\">\n     <g id=\"line2d_44\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"67.433398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_31\">\n     <g id=\"line2d_45\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"57.820449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_32\">\n     <g id=\"line2d_46\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"52.939199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_33\">\n     <g id=\"line2d_47\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"49.475897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_34\">\n     <g id=\"line2d_48\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"46.789551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_35\">\n     <g id=\"line2d_49\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"44.594647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_36\">\n     <g id=\"line2d_50\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"42.738882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_37\">\n     <g id=\"line2d_51\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"41.131346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_38\">\n     <g id=\"line2d_52\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"39.713398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_39\">\n     <g id=\"line2d_53\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"30.100449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_40\">\n     <g id=\"line2d_54\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"25.219199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_41\">\n     <g id=\"line2d_55\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"21.755897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_42\">\n     <g id=\"line2d_56\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"19.069551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_43\">\n     <g id=\"line2d_57\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"16.874647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_44\">\n     <g id=\"line2d_58\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"15.018882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_45\">\n     <g id=\"line2d_59\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"13.411346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_46\">\n     <g id=\"line2d_60\">\n      <g>\n       <use xlink:href=\"#m28a5c42424\" x=\"43.725\" y=\"11.993398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- loss -->\n     <g transform=\"translate(14.075 90.025) rotate(-90) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-6c\" d=\"M 1825 125 \nL 1325 125 \nL 1325 4400 \nL 1825 4400 \nL 1825 125 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-73\" d=\"M 2750 900 \nQ 2750 500 2437 287 \nQ 2125 75 1650 75 \nQ 1050 75 725 312 \nQ 400 550 400 1000 \nL 900 1000 \nQ 900 700 1112 600 \nQ 1325 500 1625 500 \nQ 1925 500 2075 612 \nQ 2225 725 2225 900 \nQ 2225 1025 2100 1150 \nQ 1975 1275 1475 1350 \nQ 900 1425 687 1637 \nQ 475 1850 475 2200 \nQ 475 2500 762 2737 \nQ 1050 2975 1600 2975 \nQ 2100 2975 2387 2750 \nQ 2675 2525 2675 2150 \nL 2175 2150 \nQ 2175 2375 2012 2462 \nQ 1850 2550 1600 2550 \nQ 1275 2550 1137 2437 \nQ 1000 2325 1000 2175 \nQ 1000 2000 1125 1900 \nQ 1250 1800 1650 1750 \nQ 2300 1650 2525 1437 \nQ 2750 1225 2750 900 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-6c\"/>\n      <use xlink:href=\"#SimHei-6f\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"150\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_61\">\n    <path d=\"M 43.725 23.898172 \nL 53.025 33.957058 \nL 62.814474 33.977976 \nL 72.603947 33.977642 \nL 82.393421 33.977602 \nL 92.182895 33.977896 \nL 101.972368 33.977713 \nL 111.761842 33.977879 \nL 121.551316 33.978015 \nL 131.340789 33.97799 \nL 141.130263 33.977906 \nL 150.919737 33.978012 \nL 160.709211 33.977904 \nL 170.498684 33.976388 \nL 180.288158 33.976886 \nL 190.077632 33.977886 \nL 199.867105 33.978072 \nL 209.656579 33.977744 \nL 219.446053 33.978035 \nL 229.235526 33.977819 \nL 239.025 33.976959 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n   </g>\n   <g id=\"line2d_62\">\n    <path d=\"M 43.725 25.308405 \nL 53.025 37.549097 \nL 62.814474 37.528889 \nL 72.603947 37.46608 \nL 82.393421 37.54527 \nL 92.182895 37.534691 \nL 101.972368 37.474419 \nL 111.761842 37.531751 \nL 121.551316 37.48898 \nL 131.340789 37.486602 \nL 141.130263 37.52488 \nL 150.919737 37.5254 \nL 160.709211 37.480467 \nL 170.498684 37.428043 \nL 180.288158 37.442571 \nL 190.077632 37.479164 \nL 199.867105 37.508937 \nL 209.656579 37.541157 \nL 219.446053 37.51807 \nL 229.235526 37.485463 \nL 239.025 37.446702 \n\" clip-path=\"url(#pace90c3ebd)\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 43.725 149.325 \nL 43.725 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 239.025 149.325 \nL 239.025 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 43.725 149.325 \nL 239.025 149.325 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 43.725 10.725 \nL 239.025 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"legend_1\">\n    <g id=\"patch_7\">\n     <path d=\"M 50.725 144.325 \nL 107.725 144.325 \nQ 109.725 144.325 109.725 142.325 \nL 109.725 116.825 \nQ 109.725 114.825 107.725 114.825 \nL 50.725 114.825 \nQ 48.725 114.825 48.725 116.825 \nL 48.725 142.325 \nQ 48.725 144.325 50.725 144.325 \nz\n\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n    </g>\n    <g id=\"line2d_63\">\n     <path d=\"M 52.725 122.325 \nL 62.725 122.325 \nL 72.725 122.325 \n\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n    </g>\n    <g id=\"text_13\">\n     <!-- train -->\n     <g transform=\"translate(80.725 125.825) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-74\" d=\"M 2750 200 \nQ 2625 150 2462 112 \nQ 2300 75 2025 75 \nQ 1575 75 1300 325 \nQ 1025 575 1025 1025 \nL 1025 2525 \nL 175 2525 \nL 175 2925 \nL 1025 2925 \nL 1025 3900 \nL 1525 3900 \nL 1525 2925 \nL 2550 2925 \nL 2550 2525 \nL 1525 2525 \nL 1525 1000 \nQ 1525 800 1625 662 \nQ 1725 525 2000 525 \nQ 2275 525 2450 575 \nQ 2625 625 2750 700 \nL 2750 200 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-72\" d=\"M 2500 2425 \nQ 2025 2500 1700 2287 \nQ 1375 2075 1150 1550 \nL 1150 125 \nL 650 125 \nL 650 2925 \nL 1150 2925 \nL 1150 2200 \nQ 1375 2600 1712 2787 \nQ 2050 2975 2500 2975 \nL 2500 2425 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-61\" d=\"M 2875 125 \nL 2275 125 \nQ 2225 175 2200 262 \nQ 2175 350 2175 475 \nQ 2000 275 1750 175 \nQ 1500 75 1225 75 \nQ 825 75 550 275 \nQ 275 475 275 850 \nQ 275 1225 525 1450 \nQ 775 1675 1300 1750 \nQ 1650 1800 1912 1875 \nQ 2175 1950 2175 2075 \nQ 2175 2225 2062 2375 \nQ 1950 2525 1575 2525 \nQ 1275 2525 1137 2412 \nQ 1000 2300 950 2100 \nL 400 2100 \nQ 450 2500 762 2737 \nQ 1075 2975 1575 2975 \nQ 2125 2975 2400 2725 \nQ 2675 2475 2675 2025 \nL 2675 650 \nQ 2675 500 2725 375 \nQ 2775 250 2875 125 \nz\nM 2175 1050 \nL 2175 1550 \nQ 2025 1500 1887 1462 \nQ 1750 1425 1425 1375 \nQ 1050 1325 937 1200 \nQ 825 1075 825 900 \nQ 825 750 937 637 \nQ 1050 525 1275 525 \nQ 1500 525 1762 650 \nQ 2025 775 2175 1050 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-69\" d=\"M 1800 3725 \nL 1300 3725 \nL 1300 4375 \nL 1800 4375 \nL 1800 3725 \nz\nM 1800 125 \nL 1300 125 \nL 1300 2925 \nL 1800 2925 \nL 1800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-6e\" d=\"M 2800 125 \nL 2300 125 \nL 2300 1925 \nQ 2300 2225 2150 2400 \nQ 2000 2575 1750 2575 \nQ 1425 2575 1137 2237 \nQ 850 1900 850 1400 \nL 850 125 \nL 350 125 \nL 350 2925 \nL 850 2925 \nL 850 2400 \nQ 1050 2675 1287 2825 \nQ 1525 2975 1900 2975 \nQ 2350 2975 2575 2725 \nQ 2800 2475 2800 2100 \nL 2800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-74\"/>\n      <use xlink:href=\"#SimHei-72\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-61\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-69\" x=\"150\"/>\n      <use xlink:href=\"#SimHei-6e\" x=\"200\"/>\n     </g>\n    </g>\n    <g id=\"line2d_64\">\n     <path d=\"M 52.725 135.575 \nL 62.725 135.575 \nL 72.725 135.575 \n\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n    </g>\n    <g id=\"text_14\">\n     <!-- test -->\n     <g transform=\"translate(80.725 139.075) scale(0.1 -0.1)\">\n      <use xlink:href=\"#SimHei-74\"/>\n      <use xlink:href=\"#SimHei-65\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-74\" x=\"150\"/>\n     </g>\n    </g>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pace90c3ebd\">\n   <rect x=\"43.725\" y=\"10.725\" width=\"195.3\" height=\"138.6\"/>\n  </clipPath>\n </defs>\n</svg>\n"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 从多项式特征中选择前2个维度，即1和x\n",
    "train(poly_features[:n_train, :2], poly_features[n_train:, :2],\n",
    "      labels[:n_train], labels[n_train:])"
   ],
   "metadata": {
    "collapsed": false
   },
   "id": "64fd5ba32c834e55",
   "execution_count": 10
  },
  {
   "cell_type": "code",
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "weight: [[ 5.02464771e+00  1.25282300e+00 -3.42095351e+00  5.35396385e+00\n",
      "   1.27582755e-02  6.71611130e-01  3.73931229e-01  1.02229498e-01\n",
      "   2.40222678e-01 -1.29662976e-01 -6.66626841e-02 -1.87331244e-01\n",
      "   1.69256806e-01 -2.07456574e-02 -3.21694762e-02  1.24951662e-03\n",
      "   1.48536228e-02 -8.97630155e-02  1.82417005e-01  1.19552821e-01]]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n",
      "Font 'default' does not have a glyph for '\\u2212' [U+2212], substituting with a dummy symbol.\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 350x250 with 1 Axes>",
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"256.225pt\" height=\"183.775pt\" viewBox=\"0 0 256.225 183.775\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n <metadata>\n  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n   <cc:Work>\n    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n    <dc:date>2024-03-29T11:42:57.797742</dc:date>\n    <dc:format>image/svg+xml</dc:format>\n    <dc:creator>\n     <cc:Agent>\n      <dc:title>Matplotlib v3.7.2, https://matplotlib.org/</dc:title>\n     </cc:Agent>\n    </dc:creator>\n   </cc:Work>\n  </rdf:RDF>\n </metadata>\n <defs>\n  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M -0 183.775 \nL 256.225 183.775 \nL 256.225 0 \nL -0 0 \nz\n\" style=\"fill: #ffffff\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 43.725 149.325 \nL 239.025 149.325 \nL 239.025 10.725 \nL 43.725 10.725 \nz\n\" style=\"fill: #ffffff\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <path d=\"M 76.166428 149.325 \nL 76.166428 10.725 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_2\">\n      <defs>\n       <path id=\"md70699fbd1\" d=\"M 0 0 \nL 0 3.5 \n\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#md70699fbd1\" x=\"76.166428\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- 250 -->\n      <g transform=\"translate(68.666428 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-32\" d=\"M 300 250 \nQ 325 625 650 925 \nQ 975 1225 1475 1862 \nQ 1975 2500 2125 2850 \nQ 2275 3200 2237 3450 \nQ 2200 3700 2000 3862 \nQ 1800 4025 1537 4000 \nQ 1275 3975 1037 3800 \nQ 800 3625 675 3275 \nL 200 3350 \nQ 400 3925 712 4187 \nQ 1025 4450 1450 4475 \nQ 1700 4500 1900 4462 \nQ 2100 4425 2312 4287 \nQ 2525 4150 2662 3875 \nQ 2800 3600 2762 3212 \nQ 2725 2825 2375 2287 \nQ 2025 1750 1025 600 \nL 2825 600 \nL 2825 150 \nL 300 150 \nL 300 250 \nz\n\" transform=\"scale(0.015625)\"/>\n        <path id=\"SimHei-35\" d=\"M 550 1325 \nQ 725 650 1150 575 \nQ 1575 500 1837 662 \nQ 2100 825 2212 1087 \nQ 2325 1350 2312 1675 \nQ 2300 2000 2137 2225 \nQ 1975 2450 1725 2525 \nQ 1475 2600 1162 2525 \nQ 850 2450 650 2175 \nL 225 2225 \nQ 275 2375 700 4375 \nL 2675 4375 \nL 2675 3925 \nL 1075 3925 \nQ 950 3250 825 2850 \nQ 1200 3025 1525 3012 \nQ 1850 3000 2150 2862 \nQ 2450 2725 2587 2487 \nQ 2725 2250 2787 2012 \nQ 2850 1775 2837 1500 \nQ 2825 1225 2725 937 \nQ 2625 650 2425 462 \nQ 2225 275 1937 162 \nQ 1650 50 1275 75 \nQ 900 100 562 350 \nQ 225 600 100 1200 \nL 550 1325 \nz\n\" transform=\"scale(0.015625)\"/>\n        <path id=\"SimHei-30\" d=\"M 225 2537 \nQ 250 3200 412 3587 \nQ 575 3975 875 4225 \nQ 1175 4475 1612 4475 \nQ 2050 4475 2375 4112 \nQ 2700 3750 2800 3200 \nQ 2900 2650 2862 1937 \nQ 2825 1225 2612 775 \nQ 2400 325 1975 150 \nQ 1550 -25 1125 187 \nQ 700 400 525 750 \nQ 350 1100 275 1487 \nQ 200 1875 225 2537 \nz\nM 750 2687 \nQ 675 2000 800 1462 \nQ 925 925 1212 700 \nQ 1500 475 1800 612 \nQ 2100 750 2237 1162 \nQ 2375 1575 2375 2062 \nQ 2375 2550 2337 2950 \nQ 2300 3350 2112 3675 \nQ 1925 4000 1612 4012 \nQ 1300 4025 1062 3700 \nQ 825 3375 750 2687 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-32\"/>\n       <use xlink:href=\"#SimHei-35\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_3\">\n      <path d=\"M 108.738142 149.325 \nL 108.738142 10.725 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_4\">\n      <g>\n       <use xlink:href=\"#md70699fbd1\" x=\"108.738142\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- 500 -->\n      <g transform=\"translate(101.238142 163.2) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-35\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_5\">\n      <path d=\"M 141.309857 149.325 \nL 141.309857 10.725 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_6\">\n      <g>\n       <use xlink:href=\"#md70699fbd1\" x=\"141.309857\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 750 -->\n      <g transform=\"translate(133.809857 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-37\" d=\"M 850 150 \nQ 1300 2050 2425 3925 \nL 275 3925 \nL 275 4375 \nL 2950 4375 \nL 2950 3950 \nQ 1775 2050 1400 150 \nL 850 150 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-37\"/>\n       <use xlink:href=\"#SimHei-35\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_7\">\n      <path d=\"M 173.881571 149.325 \nL 173.881571 10.725 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_8\">\n      <g>\n       <use xlink:href=\"#md70699fbd1\" x=\"173.881571\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 1000 -->\n      <g transform=\"translate(163.881571 163.2) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"SimHei-31\" d=\"M 1400 3600 \nQ 1075 3275 575 2975 \nL 575 3450 \nQ 1200 3875 1600 4450 \nL 1900 4450 \nL 1900 150 \nL 1400 150 \nL 1400 3600 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-31\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"150\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_9\">\n      <path d=\"M 206.453286 149.325 \nL 206.453286 10.725 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_10\">\n      <g>\n       <use xlink:href=\"#md70699fbd1\" x=\"206.453286\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 1250 -->\n      <g transform=\"translate(196.453286 163.2) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\"/>\n       <use xlink:href=\"#SimHei-32\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-35\" x=\"100\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"150\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_6\">\n     <g id=\"line2d_11\">\n      <path d=\"M 239.025 149.325 \nL 239.025 10.725 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_12\">\n      <g>\n       <use xlink:href=\"#md70699fbd1\" x=\"239.025\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- 1500 -->\n      <g transform=\"translate(229.025 163.2) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\"/>\n       <use xlink:href=\"#SimHei-35\" x=\"50\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"100\"/>\n       <use xlink:href=\"#SimHei-30\" x=\"150\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_7\">\n     <!-- epoch -->\n     <g transform=\"translate(128.875 175.325) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-65\" d=\"M 2850 1075 \nQ 2800 625 2450 350 \nQ 2100 75 1625 75 \nQ 1025 75 637 462 \nQ 250 850 250 1525 \nQ 250 2200 637 2587 \nQ 1025 2975 1625 2975 \nQ 2150 2975 2487 2637 \nQ 2825 2300 2825 1525 \nL 800 1525 \nQ 800 975 1037 750 \nQ 1275 525 1625 525 \nQ 1900 525 2075 662 \nQ 2250 800 2300 1075 \nL 2850 1075 \nz\nM 2250 1925 \nQ 2200 2275 2025 2412 \nQ 1850 2550 1575 2550 \nQ 1325 2550 1125 2412 \nQ 925 2275 825 1925 \nL 2250 1925 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-70\" d=\"M 2825 1525 \nQ 2825 800 2475 425 \nQ 2125 50 1625 50 \nQ 1350 50 1150 162 \nQ 950 275 800 500 \nL 800 -800 \nL 300 -800 \nL 300 2925 \nL 800 2925 \nL 800 2550 \nQ 950 2775 1150 2875 \nQ 1350 2975 1625 2975 \nQ 2125 2975 2475 2612 \nQ 2825 2250 2825 1525 \nz\nM 2275 1525 \nQ 2275 2000 2087 2262 \nQ 1900 2525 1525 2525 \nQ 1225 2525 1012 2262 \nQ 800 2000 800 1525 \nQ 800 1050 1012 775 \nQ 1225 500 1525 500 \nQ 1900 500 2087 775 \nQ 2275 1050 2275 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-6f\" d=\"M 2925 1525 \nQ 2925 875 2525 475 \nQ 2125 75 1575 75 \nQ 1025 75 625 475 \nQ 225 875 225 1525 \nQ 225 2175 625 2575 \nQ 1025 2975 1575 2975 \nQ 2125 2975 2525 2575 \nQ 2925 2175 2925 1525 \nz\nM 2375 1525 \nQ 2375 2025 2125 2275 \nQ 1875 2525 1575 2525 \nQ 1275 2525 1025 2275 \nQ 775 2025 775 1525 \nQ 775 1025 1025 775 \nQ 1275 525 1575 525 \nQ 1875 525 2125 775 \nQ 2375 1025 2375 1525 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-63\" d=\"M 2850 1250 \nQ 2850 725 2487 400 \nQ 2125 75 1575 75 \nQ 1025 75 625 462 \nQ 225 850 225 1525 \nQ 225 2200 625 2587 \nQ 1025 2975 1575 2975 \nQ 2125 2975 2450 2687 \nQ 2775 2400 2775 2000 \nL 2225 2000 \nQ 2200 2300 2012 2412 \nQ 1825 2525 1575 2525 \nQ 1275 2525 1025 2287 \nQ 775 2050 775 1525 \nQ 775 1000 1025 762 \nQ 1275 525 1575 525 \nQ 1900 525 2100 700 \nQ 2300 875 2300 1250 \nL 2850 1250 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-68\" d=\"M 2800 125 \nL 2300 125 \nL 2300 1925 \nQ 2300 2225 2150 2400 \nQ 2000 2575 1750 2575 \nQ 1425 2575 1137 2237 \nQ 850 1900 850 1400 \nL 850 125 \nL 350 125 \nL 350 4400 \nL 850 4400 \nL 850 2400 \nQ 1050 2675 1287 2825 \nQ 1525 2975 1900 2975 \nQ 2350 2975 2575 2725 \nQ 2800 2475 2800 2100 \nL 2800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-65\"/>\n      <use xlink:href=\"#SimHei-70\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-6f\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-63\" x=\"150\"/>\n      <use xlink:href=\"#SimHei-68\" x=\"200\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_13\">\n      <path d=\"M 43.725 149.325 \nL 239.025 149.325 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_14\">\n      <defs>\n       <path id=\"m9f30b1cf29\" d=\"M 0 0 \nL -3.5 0 \n\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#m9f30b1cf29\" x=\"43.725\" y=\"149.325\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- $\\mathdefault{10^{-3}}$ -->\n      <g transform=\"translate(19.325 152.85) scale(0.1 -0.1)\">\n       <defs>\n        <path id=\"STIXGeneral-Regular-a4\" d=\"M 3341 256 \nL 3034 -64 \nL 2406 563 \nQ 2029 301 1606 301 \nQ 1171 301 794 563 \nL 179 -64 \nL -141 256 \nL 486 870 \nQ 224 1248 224 1677 \nQ 224 2118 486 2483 \nL -141 3110 \nL 179 3418 \nL 794 2803 \nQ 1184 3053 1606 3053 \nQ 2048 3053 2406 2803 \nL 3034 3418 \nL 3341 3110 \nL 2726 2483 \nQ 2976 2112 2976 1683 \nQ 2976 1261 2726 870 \nL 3341 256 \nz\nM 2541 1690 \nQ 2541 2086 2265 2364 \nQ 1990 2643 1594 2643 \nQ 1210 2643 934 2361 \nQ 659 2080 659 1683 \nQ 659 1280 937 995 \nQ 1216 710 1606 710 \nQ 2003 710 2272 995 \nQ 2541 1280 2541 1690 \nz\n\" transform=\"scale(0.015625)\"/>\n        <path id=\"SimHei-33\" d=\"M 250 1225 \nL 700 1300 \nQ 800 975 1025 762 \nQ 1250 550 1587 562 \nQ 1925 575 2125 837 \nQ 2325 1100 2300 1437 \nQ 2275 1775 2037 1962 \nQ 1800 2150 1275 2225 \nL 1275 2550 \nQ 1800 2600 2037 2825 \nQ 2275 3050 2250 3412 \nQ 2225 3775 1925 3937 \nQ 1625 4100 1287 3975 \nQ 950 3850 750 3275 \nL 300 3350 \nQ 450 3800 712 4100 \nQ 975 4400 1425 4450 \nQ 1875 4500 2212 4337 \nQ 2550 4175 2687 3837 \nQ 2825 3500 2725 3100 \nQ 2625 2700 2150 2400 \nQ 2500 2250 2687 1950 \nQ 2875 1650 2812 1162 \nQ 2750 675 2375 375 \nQ 2000 75 1525 87 \nQ 1050 100 700 387 \nQ 350 675 250 1225 \nz\n\" transform=\"scale(0.015625)\"/>\n       </defs>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-33\" transform=\"translate(135.799794 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_15\">\n      <path d=\"M 43.725 121.605 \nL 239.025 121.605 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_16\">\n      <g>\n       <use xlink:href=\"#m9f30b1cf29\" x=\"43.725\" y=\"121.605\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- $\\mathdefault{10^{-2}}$ -->\n      <g transform=\"translate(19.325 125.13) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-32\" transform=\"translate(135.799794 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_17\">\n      <path d=\"M 43.725 93.885 \nL 239.025 93.885 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_18\">\n      <g>\n       <use xlink:href=\"#m9f30b1cf29\" x=\"43.725\" y=\"93.885\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- $\\mathdefault{10^{-1}}$ -->\n      <g transform=\"translate(19.325 97.36) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.335938)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.335938)\"/>\n       <use xlink:href=\"#STIXGeneral-Regular-a4\" transform=\"translate(100.799805 32.328125) scale(0.7)\"/>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(135.799794 32.328125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_19\">\n      <path d=\"M 43.725 66.165 \nL 239.025 66.165 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_20\">\n      <g>\n       <use xlink:href=\"#m9f30b1cf29\" x=\"43.725\" y=\"66.165\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- $\\mathdefault{10^{0}}$ -->\n      <g transform=\"translate(22.825 69.64) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.0625)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.0625)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(100.799805 32.054688) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_21\">\n      <path d=\"M 43.725 38.445 \nL 239.025 38.445 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_22\">\n      <g>\n       <use xlink:href=\"#m9f30b1cf29\" x=\"43.725\" y=\"38.445\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- $\\mathdefault{10^{1}}$ -->\n      <g transform=\"translate(22.825 41.92) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.335938)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.335938)\"/>\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(100.799805 32.328125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_23\">\n      <path d=\"M 43.725 10.725 \nL 239.025 10.725 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n     </g>\n     <g id=\"line2d_24\">\n      <g>\n       <use xlink:href=\"#m9f30b1cf29\" x=\"43.725\" y=\"10.725\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n      </g>\n     </g>\n     <g id=\"text_13\">\n      <!-- $\\mathdefault{10^{2}}$ -->\n      <g transform=\"translate(22.825 14.25) scale(0.1 -0.1)\">\n       <use xlink:href=\"#SimHei-31\" transform=\"translate(0 0.789062)\"/>\n       <use xlink:href=\"#SimHei-30\" transform=\"translate(50 0.789062)\"/>\n       <use xlink:href=\"#SimHei-32\" transform=\"translate(100.799805 32.78125) scale(0.7)\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_7\">\n     <g id=\"line2d_25\">\n      <defs>\n       <path id=\"m837fb7e264\" d=\"M 0 0 \nL -2 0 \n\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </defs>\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"140.980449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_8\">\n     <g id=\"line2d_26\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"136.099199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_9\">\n     <g id=\"line2d_27\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"132.635897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_10\">\n     <g id=\"line2d_28\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"129.949551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_11\">\n     <g id=\"line2d_29\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"127.754647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_12\">\n     <g id=\"line2d_30\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"125.898882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_13\">\n     <g id=\"line2d_31\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"124.291346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_14\">\n     <g id=\"line2d_32\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"122.873398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_15\">\n     <g id=\"line2d_33\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"113.260449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_16\">\n     <g id=\"line2d_34\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"108.379199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_17\">\n     <g id=\"line2d_35\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"104.915897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_18\">\n     <g id=\"line2d_36\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"102.229551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_19\">\n     <g id=\"line2d_37\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"100.034647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_20\">\n     <g id=\"line2d_38\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"98.178882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_21\">\n     <g id=\"line2d_39\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"96.571346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_22\">\n     <g id=\"line2d_40\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"95.153398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_23\">\n     <g id=\"line2d_41\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"85.540449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_24\">\n     <g id=\"line2d_42\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"80.659199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_25\">\n     <g id=\"line2d_43\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"77.195897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_26\">\n     <g id=\"line2d_44\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"74.509551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_27\">\n     <g id=\"line2d_45\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"72.314647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_28\">\n     <g id=\"line2d_46\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"70.458882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_29\">\n     <g id=\"line2d_47\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"68.851346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_30\">\n     <g id=\"line2d_48\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"67.433398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_31\">\n     <g id=\"line2d_49\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"57.820449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_32\">\n     <g id=\"line2d_50\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"52.939199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_33\">\n     <g id=\"line2d_51\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"49.475897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_34\">\n     <g id=\"line2d_52\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"46.789551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_35\">\n     <g id=\"line2d_53\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"44.594647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_36\">\n     <g id=\"line2d_54\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"42.738882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_37\">\n     <g id=\"line2d_55\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"41.131346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_38\">\n     <g id=\"line2d_56\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"39.713398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_39\">\n     <g id=\"line2d_57\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"30.100449\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_40\">\n     <g id=\"line2d_58\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"25.219199\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_41\">\n     <g id=\"line2d_59\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"21.755897\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_42\">\n     <g id=\"line2d_60\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"19.069551\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_43\">\n     <g id=\"line2d_61\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"16.874647\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_44\">\n     <g id=\"line2d_62\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"15.018882\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_45\">\n     <g id=\"line2d_63\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"13.411346\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_46\">\n     <g id=\"line2d_64\">\n      <g>\n       <use xlink:href=\"#m837fb7e264\" x=\"43.725\" y=\"11.993398\" style=\"stroke: #000000; stroke-width: 0.6\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_14\">\n     <!-- loss -->\n     <g transform=\"translate(14.075 90.025) rotate(-90) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-6c\" d=\"M 1825 125 \nL 1325 125 \nL 1325 4400 \nL 1825 4400 \nL 1825 125 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-73\" d=\"M 2750 900 \nQ 2750 500 2437 287 \nQ 2125 75 1650 75 \nQ 1050 75 725 312 \nQ 400 550 400 1000 \nL 900 1000 \nQ 900 700 1112 600 \nQ 1325 500 1625 500 \nQ 1925 500 2075 612 \nQ 2225 725 2225 900 \nQ 2225 1025 2100 1150 \nQ 1975 1275 1475 1350 \nQ 900 1425 687 1637 \nQ 475 1850 475 2200 \nQ 475 2500 762 2737 \nQ 1050 2975 1600 2975 \nQ 2100 2975 2387 2750 \nQ 2675 2525 2675 2150 \nL 2175 2150 \nQ 2175 2375 2012 2462 \nQ 1850 2550 1600 2550 \nQ 1275 2550 1137 2437 \nQ 1000 2325 1000 2175 \nQ 1000 2000 1125 1900 \nQ 1250 1800 1650 1750 \nQ 2300 1650 2525 1437 \nQ 2750 1225 2750 900 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-6c\"/>\n      <use xlink:href=\"#SimHei-6f\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"150\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_65\">\n    <path d=\"M 43.725 25.060821 \nL 46.20045 70.996278 \nL 48.806187 88.354576 \nL 51.411925 93.313787 \nL 54.017662 95.962916 \nL 56.623399 97.768616 \nL 59.229136 99.110247 \nL 61.834873 100.17584 \nL 64.44061 101.090274 \nL 67.046348 101.920388 \nL 69.652085 102.700159 \nL 72.257822 103.437361 \nL 74.863559 104.174799 \nL 77.469296 104.890443 \nL 80.075033 105.586335 \nL 82.680771 106.267193 \nL 85.286508 106.935864 \nL 87.892245 107.590235 \nL 90.497982 108.227993 \nL 93.103719 108.85114 \nL 95.709456 109.463199 \nL 98.315193 110.058479 \nL 100.920931 110.636461 \nL 103.526668 111.197714 \nL 106.132405 111.743459 \nL 108.738142 112.271808 \nL 111.343879 112.784951 \nL 113.949616 113.274749 \nL 116.555354 113.759935 \nL 119.161091 114.220002 \nL 121.766828 114.666503 \nL 124.372565 115.087854 \nL 126.978302 115.501406 \nL 129.584039 115.896631 \nL 132.189777 116.272651 \nL 134.795514 116.634121 \nL 137.401251 116.977774 \nL 140.006988 117.305494 \nL 142.612725 117.619197 \nL 145.218462 117.915351 \nL 147.824199 118.199669 \nL 150.429937 118.465907 \nL 153.035674 118.720429 \nL 155.641411 118.962784 \nL 158.247148 119.190873 \nL 160.852885 119.404182 \nL 163.458622 119.610667 \nL 166.06436 119.802614 \nL 168.670097 119.984325 \nL 171.275834 120.155031 \nL 173.881571 120.315082 \nL 176.487308 120.465689 \nL 179.093045 120.607286 \nL 181.698783 120.741052 \nL 184.30452 120.866526 \nL 186.910257 120.983899 \nL 189.515994 121.092338 \nL 192.121731 121.195783 \nL 194.727468 121.294339 \nL 197.333205 121.384555 \nL 199.938943 121.4663 \nL 202.54468 121.548626 \nL 205.150417 121.623344 \nL 207.756154 121.68974 \nL 210.361891 121.758327 \nL 212.967628 121.819003 \nL 215.573366 121.872873 \nL 218.179103 121.929699 \nL 220.78484 121.978822 \nL 223.390577 122.025648 \nL 225.996314 122.067163 \nL 228.602051 122.110755 \nL 231.207789 122.149253 \nL 233.813526 122.183998 \nL 236.419263 122.219144 \nL 239.025 122.249328 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n   </g>\n   <g id=\"line2d_66\">\n    <path d=\"M 43.725 26.330566 \nL 46.20045 54.03738 \nL 48.806187 53.764497 \nL 51.411925 56.121779 \nL 54.017662 58.988764 \nL 56.623399 61.696293 \nL 59.229136 64.155544 \nL 61.834873 66.404173 \nL 64.44061 68.398962 \nL 67.046348 70.297097 \nL 69.652085 72.076729 \nL 72.257822 73.866569 \nL 74.863559 75.554024 \nL 77.469296 77.220977 \nL 80.075033 78.929593 \nL 82.680771 80.656403 \nL 85.286508 82.39336 \nL 87.892245 84.150798 \nL 90.497982 85.959467 \nL 93.103719 87.747351 \nL 95.709456 89.637432 \nL 98.315193 91.574098 \nL 100.920931 93.57313 \nL 103.526668 95.593986 \nL 106.132405 97.76924 \nL 108.738142 99.894499 \nL 111.343879 102.076214 \nL 113.949616 104.217383 \nL 116.555354 106.496542 \nL 119.161091 108.57258 \nL 121.766828 110.588755 \nL 124.372565 112.456538 \nL 126.978302 113.845232 \nL 129.584039 115.000618 \nL 132.189777 115.585069 \nL 134.795514 115.787334 \nL 137.401251 115.501641 \nL 140.006988 114.808232 \nL 142.612725 113.892509 \nL 145.218462 112.797374 \nL 147.824199 111.652372 \nL 150.429937 110.342272 \nL 153.035674 109.123096 \nL 155.641411 107.945543 \nL 158.247148 106.814202 \nL 160.852885 105.660741 \nL 163.458622 104.666085 \nL 166.06436 103.645296 \nL 168.670097 102.691561 \nL 171.275834 101.815075 \nL 173.881571 100.9938 \nL 176.487308 100.179949 \nL 179.093045 99.457701 \nL 181.698783 98.792646 \nL 184.30452 98.121676 \nL 186.910257 97.525987 \nL 189.515994 96.918495 \nL 192.121731 96.384701 \nL 194.727468 95.866093 \nL 197.333205 95.408143 \nL 199.938943 94.920365 \nL 202.54468 94.511541 \nL 205.150417 94.106679 \nL 207.756154 93.73244 \nL 210.361891 93.392782 \nL 212.967628 93.041755 \nL 215.573366 92.735015 \nL 218.179103 92.415155 \nL 220.78484 92.129839 \nL 223.390577 91.858886 \nL 225.996314 91.616377 \nL 228.602051 91.37283 \nL 231.207789 91.129527 \nL 233.813526 90.907716 \nL 236.419263 90.730595 \nL 239.025 90.533385 \n\" clip-path=\"url(#p1c059ca737)\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 43.725 149.325 \nL 43.725 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 239.025 149.325 \nL 239.025 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 43.725 149.325 \nL 239.025 149.325 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 43.725 10.725 \nL 239.025 10.725 \n\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n   </g>\n   <g id=\"legend_1\">\n    <g id=\"patch_7\">\n     <path d=\"M 175.025 45.225 \nL 232.025 45.225 \nQ 234.025 45.225 234.025 43.225 \nL 234.025 17.725 \nQ 234.025 15.725 232.025 15.725 \nL 175.025 15.725 \nQ 173.025 15.725 173.025 17.725 \nL 173.025 43.225 \nQ 173.025 45.225 175.025 45.225 \nz\n\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n    </g>\n    <g id=\"line2d_67\">\n     <path d=\"M 177.025 23.225 \nL 187.025 23.225 \nL 197.025 23.225 \n\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n    </g>\n    <g id=\"text_15\">\n     <!-- train -->\n     <g transform=\"translate(205.025 26.725) scale(0.1 -0.1)\">\n      <defs>\n       <path id=\"SimHei-74\" d=\"M 2750 200 \nQ 2625 150 2462 112 \nQ 2300 75 2025 75 \nQ 1575 75 1300 325 \nQ 1025 575 1025 1025 \nL 1025 2525 \nL 175 2525 \nL 175 2925 \nL 1025 2925 \nL 1025 3900 \nL 1525 3900 \nL 1525 2925 \nL 2550 2925 \nL 2550 2525 \nL 1525 2525 \nL 1525 1000 \nQ 1525 800 1625 662 \nQ 1725 525 2000 525 \nQ 2275 525 2450 575 \nQ 2625 625 2750 700 \nL 2750 200 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-72\" d=\"M 2500 2425 \nQ 2025 2500 1700 2287 \nQ 1375 2075 1150 1550 \nL 1150 125 \nL 650 125 \nL 650 2925 \nL 1150 2925 \nL 1150 2200 \nQ 1375 2600 1712 2787 \nQ 2050 2975 2500 2975 \nL 2500 2425 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-61\" d=\"M 2875 125 \nL 2275 125 \nQ 2225 175 2200 262 \nQ 2175 350 2175 475 \nQ 2000 275 1750 175 \nQ 1500 75 1225 75 \nQ 825 75 550 275 \nQ 275 475 275 850 \nQ 275 1225 525 1450 \nQ 775 1675 1300 1750 \nQ 1650 1800 1912 1875 \nQ 2175 1950 2175 2075 \nQ 2175 2225 2062 2375 \nQ 1950 2525 1575 2525 \nQ 1275 2525 1137 2412 \nQ 1000 2300 950 2100 \nL 400 2100 \nQ 450 2500 762 2737 \nQ 1075 2975 1575 2975 \nQ 2125 2975 2400 2725 \nQ 2675 2475 2675 2025 \nL 2675 650 \nQ 2675 500 2725 375 \nQ 2775 250 2875 125 \nz\nM 2175 1050 \nL 2175 1550 \nQ 2025 1500 1887 1462 \nQ 1750 1425 1425 1375 \nQ 1050 1325 937 1200 \nQ 825 1075 825 900 \nQ 825 750 937 637 \nQ 1050 525 1275 525 \nQ 1500 525 1762 650 \nQ 2025 775 2175 1050 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-69\" d=\"M 1800 3725 \nL 1300 3725 \nL 1300 4375 \nL 1800 4375 \nL 1800 3725 \nz\nM 1800 125 \nL 1300 125 \nL 1300 2925 \nL 1800 2925 \nL 1800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n       <path id=\"SimHei-6e\" d=\"M 2800 125 \nL 2300 125 \nL 2300 1925 \nQ 2300 2225 2150 2400 \nQ 2000 2575 1750 2575 \nQ 1425 2575 1137 2237 \nQ 850 1900 850 1400 \nL 850 125 \nL 350 125 \nL 350 2925 \nL 850 2925 \nL 850 2400 \nQ 1050 2675 1287 2825 \nQ 1525 2975 1900 2975 \nQ 2350 2975 2575 2725 \nQ 2800 2475 2800 2100 \nL 2800 125 \nz\n\" transform=\"scale(0.015625)\"/>\n      </defs>\n      <use xlink:href=\"#SimHei-74\"/>\n      <use xlink:href=\"#SimHei-72\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-61\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-69\" x=\"150\"/>\n      <use xlink:href=\"#SimHei-6e\" x=\"200\"/>\n     </g>\n    </g>\n    <g id=\"line2d_68\">\n     <path d=\"M 177.025 36.475 \nL 187.025 36.475 \nL 197.025 36.475 \n\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n    </g>\n    <g id=\"text_16\">\n     <!-- test -->\n     <g transform=\"translate(205.025 39.975) scale(0.1 -0.1)\">\n      <use xlink:href=\"#SimHei-74\"/>\n      <use xlink:href=\"#SimHei-65\" x=\"50\"/>\n      <use xlink:href=\"#SimHei-73\" x=\"100\"/>\n      <use xlink:href=\"#SimHei-74\" x=\"150\"/>\n     </g>\n    </g>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p1c059ca737\">\n   <rect x=\"43.725\" y=\"10.725\" width=\"195.3\" height=\"138.6\"/>\n  </clipPath>\n </defs>\n</svg>\n"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 从多项式特征中选取所有维度\n",
    "train(poly_features[:n_train, :], poly_features[n_train:, :],\n",
    "      labels[:n_train], labels[n_train:], num_epochs=1500)"
   ],
   "metadata": {
    "collapsed": false
   },
   "id": "2d7c187cebab05f5",
   "execution_count": 11
  },
  {
   "cell_type": "code",
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false
   },
   "id": "ab670293c1006fe"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
